package cn.bby.query.server.domain.agg.metadata.repository;

import cn.bby.query.base.model.dto.InterfaceMetaInfo;
import cn.bby.query.server.domain.agg.metadata.entity.InterfaceInfo;

import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
 * @author wangbenyin
 * @version 1.0
 * @date 2025/07/01
 * @since 17
 */
public interface InterfaceInfoRepository {

    List<InterfaceInfo> getByInterfaceNames(String serviceName, List<String> names);

    void createBatch(String serverName, List<InterfaceMetaInfo> infos);

    void updateStatus(InterfaceInfo interfaceInfo, String status);

    List<InterfaceInfo> archiveOldNotArchiveInterfaceId(InterfaceInfo interfaceInfo);

    Collection<InterfaceInfo> getByTableIds(Set<Long> tableIds);

    List<InterfaceInfo> popPreparedList(int limit);

    List<InterfaceInfo> getReadyList(int limit);

    InterfaceInfo getById(Long interfaceId);

    List<InterfaceInfo> popErrorOrOutTimeList();
}
